﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/admin.master" AutoEventWireup="true" CodeFile="ChiTietTiem.aspx.cs" Inherits="Admin_ChiTietTiem" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <script src="../Scripts/jquery-ui-1.8.16.custom.min.js"></script>
    <script type="text/javascript">
        $(document).ready(function () {
            $("#<%=txtThoiGianTiem.ClientID%>").datepicker({ dateFormat: "dd/mm/yy", maxDate: "+0D" });            
            activeMenu(1, 0);
        });
    </script>
    <div class="divsize">
        <asp:HiddenField ID="VacXinID" runat="server" />
         <fieldset>
            <legend>Chi tiết tiêm</legend>
            <asp:Label ID="messageKetQua" runat="server" Text=""></asp:Label>
            <ol class="form form-clear">
                    <li>
                        <label>Mã Chi tiết tiêm</label>
                        <asp:TextBox ID="txtMaCTT" Enabled="false" runat="server"></asp:TextBox>
                    </li>
                    <li>
                        <label>Mã bé</label>
                        <asp:TextBox ID="txtMaBe" runat="server"></asp:TextBox>
                    </li>
                    <li>
                        <label>Mã VC</label> <%--Chỗ này là mã vac-xin--%>
                        <asp:TextBox ID="txtMaVC" runat="server"></asp:TextBox>
                    </li>
                    <li>
                        <label>Mã NVT</label>
                        <asp:TextBox ID="txtMaNVT" runat="server"></asp:TextBox>
                    </li>
                    <li>
                        <label>Mã NVTV</label>
                        <asp:TextBox ID="txtMaNVTV" runat="server"></asp:TextBox>
                    </li>
                    <li>
                        <label>Liều lượng</label>
                        <asp:TextBox ID="txtLieuLuong" runat="server"></asp:TextBox>
                    </li>
                    <li>
                        <label>Thông tin tiêm</label>
                        <asp:TextBox ID="txtThongtintiem" runat="server"></asp:TextBox>
                    </li>
                    <li>
                        <label>Thời gian tiêm</label>
                        <asp:TextBox ID="txtThoiGianTiem" runat="server"></asp:TextBox>
                    </li>

                <li>                    
                    <asp:Button ID="btnThem" runat="server" Text="Thêm" CssClass="btn primary" OnClick="btnThem_Click" />
                        <asp:Button ID="btnSua" runat="server" Text="Sửa" CssClass="btn primary" Enabled="false" OnClick="btnSua_Click" />
                </li>
            </ol>
        </fieldset>
    </div>
    <div>
        <fieldset>
            <legend>Danh sách</legend>
            <asp:ListView ID="ListViewChiTietTiem" runat="server"                
                          OnItemCommand="ListViewChiTietTiem_OnItemCommand"
                          OnItemDeleting="ListViewChiTietTiem_OnItemDeleting"
                          OnItemUpdating="ListViewChiTietTiem_OnItemUpdating">
                <LayoutTemplate>
                    <table border="1">
                        <tr>
                            <th>Mã Chi tiết tiêm</th>
                            <th>Mã bé</th>
                            <th>Mã VC</th>
                            <th>Mã NVT</th>
                            <th>Mã NVTV</th>
                            <th>Liều lượng</th>
                            <th>Thông tin tiêm</th>
                            <th>Thời gian tiêm</th>
                            <th>Thao tác</th>
                        </tr>
                        <asp:PlaceHolder ID="itemPlaceholder" runat="server"></asp:PlaceHolder>
                    </table>
                    <asp:DataPager ID="ThongTinBeDataPager" runat="server" PageSize="10">
                        <Fields>
                            <asp:NextPreviousPagerField ButtonType="Button"
                                ShowFirstPageButton="true"
                                ShowNextPageButton="false"
                                ShowPreviousPageButton="false" />
                            <asp:NumericPagerField ButtonCount="10" />
                            <asp:NextPreviousPagerField ButtonType="Button"
                                ShowLastPageButton="true"
                                ShowNextPageButton="false"
                                ShowPreviousPageButton="false" />
                        </Fields>
                    </asp:DataPager>
                </LayoutTemplate>
                <ItemTemplate>
                    <tr>
                        <td><%# Eval("MaCTT") %></td>
                        <td><%# Eval("MaBe") %></td>
                        <td><%# Eval("MaVC") %></td>
                        <td><%# Eval("MaNVT") %></td>
                        <td><%# Eval("MaNVTV") %></td>
                        <td><%# Eval("LieuLuong") %></td>
                        <td><%# Eval("Thongtintiem") %></td>
                        <td><%# Eval("ThoiGianTiem") %></td>
                        <td>
                            <asp:LinkButton ID="lbtnSua" ToolTip="Sửa thông tin"
                                runat="server" CommandArgument='<%# Eval("MaBe") %>'
                                CommandName="Update">Sửa</asp:LinkButton>
                            |
                            <asp:LinkButton ID="lbtnXoa" runat="server"
                                CommandArgument='<%# Eval("MaBe") %>'
                                CommandName="Delete"
                                ForeColor="Brown"
                                OnClientClick="return comfirm('Bạn chắc chắn muốn xóa')">Xóa</asp:LinkButton>
                        </td>
                    </tr>
                </ItemTemplate>
            </asp:ListView>
           <%-- <asp:Label ID="lableNull" runat="server" Enabled="false" Text="Xin hãy là em của ngày hôm qua!"></asp:Label>--%>
        </fieldset>
    </div>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder2" Runat="Server">
    <ul class="m-melanin-vertical-navigation">
         <li>
                <span class=" ss_sprite ss_shield">&nbsp;</span>
                <a id="A9" href="ChiTietTiem.aspx" class="m-melanin-vertical-navigation-link">Quản lý tiêm chủng</a>
          </li>
    </ul>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder3" Runat="Server">
    <asp:Button ID="button_create_cttiem" runat="server" CssClass="btn small primary" Text="Thêm chi tiết tiêm" />
</asp:Content>

